feat: Generate REC/2023/03 liquid chromatography tabular schema models#1188
Merged
Conversation
Support flat tabular schemas (root properties without allOf) in the codegen pipeline. The LC REC/2023/03 schema uses this older format, which previously produced empty output. Changes: - Broaden _is_adm_schema to detect flat schemas with nested object properties - Merge root-level properties in _generate_adm_module before allOf processing - Stabilize unit dedup ordering in units.py with secondary sort on const value - Preserve existing quantity_values.py unit strings when older schemas introduce alternate spellings of the same unit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ic sort Same pattern as the units.py fix — sort by (class_name, unit_str) before deduplicating so the alphabetically-first unit string always wins. Removes _read_existing_quantity_value_classes and _QV_CLASS_RE entirely. Generation is now a pure function of schemas with no dependency on committed file state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
stephenworlow
approved these changes
Apr 21, 2026
nathan-stender
added a commit
that referenced
this pull request
Apr 21, 2026
### Added - Generate REC/2023/03 liquid chromatography tabular schema models (#1188)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
propertieswithoutallOf) in the codegen pipelineunits.pyandquantity_values.pyso adding older schema dependencies doesn't change existing unit stringsChanges
generator.py: Broaden_is_adm_schemato detect flat schemas with nested object properties; merge root-level properties in_generate_adm_modulebeforeallOfprocessinggenerate.py: Add secondary sort key for deterministic unit class name assignment; read existingquantity_values.pyto preserve committed unit strings when older schemas introduce alternate spellingsTest plan
hatch run test_all.py3.10:pytest tests/ -x -q— all 1112 tests passhatch run lint— clean (ruff, black, mypy)hatch run scripts:generate-schemas --allproduces no changes to existing committed modelstest_generated_models_are_up_to_datepasses (regeneration in tmp dir matches committed)test_single_technique_smokepasses for all cached schemas🤖 Generated with Claude Code